package co.baiku.boot.im.tencent.request.data;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 列表中的脏字不能超过50个,每个自定义脏字不能超过200字节
 */
public class DirtyWordsData implements TencentImRequestData {
    /**
     * 自定义脏字列表（必填），列表中的脏字不能超过50个,每个自定义脏字不能超过200字节
     */
    @JsonProperty("DirtyWordsList")
    private List<String> dirtyWordsList = new ArrayList<>();

    public DirtyWordsData() {
    }

    public void add(String dirtyWord) {
        this.dirtyWordsList.add(dirtyWord);
    }

    public void clear() {
        this.dirtyWordsList.clear();
    }

    public int size() {
        return this.dirtyWordsList.size();
    }

    public DirtyWordsData(String... dirtyWord) {
        dirtyWordsList.addAll(Arrays.asList(dirtyWord));
    }

    public List<String> getDirtyWordsList() {
        return dirtyWordsList;
    }

    public void setDirtyWordsList(List<String> dirtyWordsList) {
        this.dirtyWordsList = dirtyWordsList;
    }
}
